package rm2;


import java.net.DatagramSocket;
import rm2.DRSserverinit;


public class RMHoldBack
{	
	public static void main(String [] argu)
	{
		
//		DRSInterfaServerImpl drssImpl = new DRSInterfaServerImpl();
//		
//		String line = null;
		
		//System.out.println("Enter the path for the Input folder:");
		//BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		//try
		//{
		//	line = in.readLine();
		//} 
		//catch (IOException e)
		//{
		//	System.out.println(e.getMessage());
		//}		
		// call your implementation and start your listeners for all 3 servers
		// uncomment the object below
			
		DRSserverinit si = new DRSserverinit("DRSSInput/Montreal");			
		UDPServer u = new UDPServer(si);
		
		DRSserverinit si1 = new DRSserverinit("DRSSInput/Toronto");			
		UDPServer u1 = new UDPServer(si1);

		DRSserverinit si2 = new DRSserverinit("DRSSInput/Vancouver");			
		UDPServer u2 = new UDPServer(si2);
		
		
		Runnable rm2 = null;
		
		try {
			rm2 = new ReliableUDPListener(new DatagramSocket(61001),si,si1,si2);
			Thread thread= new Thread(rm2);
			thread.start();
		} catch (Exception e) {

			e.printStackTrace();
		}

		//rm2.run();

	}
}
